jQuery Module plugin
The Kademi jquery module plugin is alternative for module.js. This plugin initialize click event handlers for Previous, Next, Submit buttons and page links on module page.
This plugin should be used on module page. It's integrated with standard Kademi E-learning system so it can check the progress of module, disabled or enable module page link, check answer for Quiz. It's also integrated with customized PJAX for bring the best UX for users.
Usage
- Must be initialised on module page
- Must be initialised inside pageInitFunctions
Basic example
<script type="text/javascript"> var completable = $page.parent.completable; var complete = $page.parent.complete; pageInitFunctions.push(function() { $.module({ currentUrl: "${folder.path}/", isCompleted: complete, isEditable: $editMode, isCompletable: completable, onPreviousPage: function () { flog('onPreviousPage'); }, onNextPage: function () { flog('onNextPage'); }, onQuizSubmit: function () { flog('onQuizSubmit'); return true; }, onQuizSuccess: function () { flog('onQuizSuccess'); }, onQuizError: function () { flog('onQuizError'); } }); }); </script>
Versions
1.0.0
(Source code)
Ask a question, or offer an answer